import { Connection } from 'mongoose';
import { getInstance } from '../../db';
import { commentSchema } from '../../schemas/commentSchema';

// 更新视频相关接口
export async function sendCommentService(params: IAnyObject):Promise<IAnyObject> {
  const db: Connection = await getInstance();
  const commentModel = db.model('comment', commentSchema);

  // 创建评论
  const result = await commentModel.create(params);

  return result;
}
